import { time, strtotime } from "@/utils";

const service = {

    formatStatus(row, column) {
        switch (row.status) {
            case 1:
                if (time() < strtotime(row.start)) {
                    return '暂未开始';
                }
                if (time() > strtotime(row.end)) {
                    return '已结束';
                }
                return '进行中';
            case 0:
                return '关闭';
            default:
                return '异常';
        }
    }
}


export default service
